package com.yaodian100.ec.product.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.yaodian100.core.common.entity.BaseEntity;

/**
 * 馆长推荐商品
 * @author aaron.chueh
 *
 */
@Entity
@Table(name = "EC_PROD_CAT_RC")
public class ProdCatRC extends BaseEntity  implements Comparable<ProdCatRC>{
	/**
	 * 
	 */
	private static final long serialVersionUID = -3832314215896725137L;
	
	@Id
	@GeneratedValue(generator = "gen_uuid")
	@GenericGenerator(name = "gen_uuid",strategy = "uuid")
	@Column(name = "ID", length = 32)
	private String id;
	
	@Column(name = "SORT_ORDER")
	private String sortOrder;
	
	@Column(name = "PRODUCT_ID", length = 10)
	private String productId;
	
	@Column(name = "CATEGORY_ID")
	private String categoryId;
	
	@Column(name = "SORT_WEIGHT")
	private String sortWeight;
	
	@Column(name = "ADV_TITLE", length = 12)
	private String advTitle;
	
	@Column(name = "ADV_STYLE")
	private String advStyle;
	
	@Column(name = "PRODUCT_NAME", length = 500)
	private String productName;
	
	@Column(name = "CATEGORY_PATH", length = 100)
	private String categoryPath;
	
	@Column(name = "PROMOTE_NAME", length = 200)
	private String promoteName;
	
	@Column(name = "SHELF_PRICE")
	private String shelfPrice;
	
	@Column(name = "LIST_PRICE")
	private String listPrice;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getSortOrder() {
		return sortOrder;
	}

	public void setSortOrder(String sortOrder) {
		this.sortOrder = sortOrder;
	}

	public String getProductId() {
		return productId;
	}

	public void setProductId(String productId) {
		this.productId = productId;
	}

	public String getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(String categoryId) {
		this.categoryId = categoryId;
	}

	public String getSortWeight() {
		return sortWeight;
	}

	public void setSortWeight(String sortWeight) {
		this.sortWeight = sortWeight;
	}

	public String getAdvTitle() {
		return advTitle;
	}

	public void setAdvTitle(String advTitle) {
		this.advTitle = advTitle;
	}

	public String getAdvStyle() {
		return advStyle;
	}

	public void setAdvStyle(String advStyle) {
		this.advStyle = advStyle;
	}

	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	public String getCategoryPath() {
		return categoryPath;
	}

	public void setCategoryPath(String categoryPath) {
		this.categoryPath = categoryPath;
	}

	public String getPromoteName() {
		return promoteName;
	}

	public void setPromoteName(String promoteName) {
		this.promoteName = promoteName;
	}

	public String getShelfPrice() {
		return shelfPrice;
	}

	public void setShelfPrice(String shelfPrice) {
		this.shelfPrice = shelfPrice;
	}

	public String getListPrice() {
		return listPrice;
	}

	public void setListPrice(String listPrice) {
		this.listPrice = listPrice;
	}

	@Override
	public int compareTo(ProdCatRC o) {
		return Integer.parseInt(this.sortWeight)-Integer.parseInt(o.sortWeight);
	}
}